using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class ShiftsExtend
{
		public static ResponseShiftsDto ToResponseDto(this Shifts entity)
{			return new ResponseShiftsDto
			{
				shiftId = entity.EShiftId,
				employeeId = entity.EEmployeeId,
				startTime = entity.EStartTime,
				startTimeStr =Tools.TimeToString(entity.EStartTime),
				endTime = entity.EEndTime,
				endTimeStr =Tools.TimeToString(entity.EEndTime),
				cashRegisterId = entity.ECashRegisterId,
				numberOfTransactions = entity.ENumberOfTransactions,
				totalAmount = entity.ETotalAmount,
				remark = entity.ERemark,
			};
		}
	}
}
